package com.aliyun.messagemgt.common.dto.base;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Created with IDEA
 * 用户基础权限信息,所有controller中使用的实体类均要继承此类
 *
 * @author:zhangxingxing 0027012120
 * @date:2019/3/15
 * @time:17:29
 */
public class UserInfo implements Serializable {

    private static final long serialVersionUID = -179813351613213L;
    /**
     * 用户ID
     */
    @ApiModelProperty(hidden = true)
    private String userId;
    /**
     * 用户名字
     */
    @ApiModelProperty(hidden = true)
    private String userName;
    /**
     * 用户角色 1 超级管理员  2 数据管理员  3 普通用户
     */
    @ApiModelProperty(hidden = true)
    private Integer role;
    /**
     * 所属部门编号
     */
    @ApiModelProperty(hidden = true)
    private String department;
    /**
     * 所属部门名称
     */
    @ApiModelProperty(hidden = true)
    private String departmentName;
    /**
     * 自建组织编码前缀
     */
    @ApiModelProperty(hidden = true)
    private String selfOrgCodePrefix;

    /**
     * 资源列表
     */
    @ApiModelProperty(hidden = true)
    private List<Map<String,Object>> resourceList;

    public String getUserId() {
        return userId;
    }

    public UserInfo setUserId(String userId) {
        this.userId = userId;
        return this;
    }

    public Integer getRole() {
        return role;
    }

    public UserInfo setRole(Integer role) {
        this.role = role;
        return this;
    }

    public String getDepartment() {
        return department;
    }

    public UserInfo setDepartment(String department) {
        this.department = department;
        return this;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public UserInfo setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
        return this;
    }

    public String getUserName() {
        return userName;
    }

    public UserInfo setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    public List<Map<String, Object>> getResourceList() {
        return resourceList;
    }

    public UserInfo setResourceList(List<Map<String, Object>> resourceList) {
        this.resourceList = resourceList;
        return this;
    }

    public String getSelfOrgCodePrefix() {
        return selfOrgCodePrefix;
    }

    public UserInfo setSelfOrgCodePrefix(String selfOrgCodePrefix) {
        this.selfOrgCodePrefix = selfOrgCodePrefix;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("FourAUserInfo{");
        sb.append("userId='").append(userId).append('\'');
        sb.append(", userName='").append(userName).append('\'');
        sb.append(", role=").append(role);
        sb.append(", department='").append(department).append('\'');
        sb.append(", departmentName='").append(departmentName).append('\'');
        sb.append(", selfOrgCodePrefix=").append(selfOrgCodePrefix);
        sb.append('}');
        return sb.toString();
    }
}
